home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / gcc / libnix.lha / gnu / lib / libnix / sources.lha / math / submake
Encoding:
Text File  |  1994-07-08  |  2.3 KB  |  72 lines

  1. OBJECTS2=$(OBJECTS) \
  2.          ../nix/stdio/printf.o ../nix/stdio/fprintf.o ../nix/stdio/sprintf.o \
  3.          ../nix/stdio/vprintf.o ../nix/stdio/vsprintf.o stdio/vfprintf.o \
  4.          ../nix/stdio/scanf.o ../nix/stdio/fscanf.o ../nix/stdio/sscanf.o \
  5.          ../nix/stdio/vscanf.o ../nix/stdio/vsscanf.o stdio/vfscanf.o
  6. BOBJECTS2=$(BOBJECTS) \
  7.          ../nix/stdio/printf.bo ../nix/stdio/fprintf.bo ../nix/stdio/sprintf.bo \
  8.          ../nix/stdio/vprintf.bo ../nix/stdio/vsprintf.bo stdio/vfprintf.bo \
  9.          ../nix/stdio/scanf.bo ../nix/stdio/fscanf.bo ../nix/stdio/sscanf.bo \
  10.          ../nix/stdio/vscanf.bo ../nix/stdio/vsscanf.bo stdio/vfscanf.bo
  11. OPTIONS=-I ../headers -O3 -Wall -DFULL_SPECIFIERS
  12. BOPTIONS=$(OPTIONS) -fbaserel -msmall-code
  13. REDEF=-D _DOSBase=___DOSBase \
  14.       -D _UtilityBase=___UtilityBase \
  15.       -D _MathIeeeSingBasBase=___MathIeeeSingBasBase \
  16.       -D _MathIeeeSingTransBase=___MathIeeeSingTransBase \
  17.       -D _MathIeeeDoubBasBase=___MathIeeeDoubBasBase \
  18.       -D _MathIeeeDoubTransBase=___MathIeeeDoubTransBase \
  19.       -D _LocaleBase=___LocaleBase
  20. PATTERN="*"
  21.  
  22. #Use private library bases to avoid naming collisions
  23. %.o: %.c
  24.     gcc $(OPTIONS) -S $*.c -o $*.S 2>&1|tee $*.err
  25.     gcc -E -traditional -P $(REDEF) $*.S -o $*2.S
  26.     gcc $*2.S -c -o $*.o
  27.     -rm $*.S $*2.S
  28.     -if test ! -s $*.err; then rm $*.err; fi
  29.  
  30. %.bo: %.c
  31.     gcc $(BOPTIONS) -S $*.c -o $*.S 2>&1|tee $*.err
  32.     gcc -E -traditional -P $(REDEF) $*.S -o $*2.S
  33.     gcc $*2.S -c -o $*.bo
  34.     -rm $*.S $*2.S
  35.     -if test ! -s $*.err; then rm $*.err; fi
  36.  
  37. all: libm.a blibm.a
  38.  
  39. makefile: submake ../headers/makemake
  40.     rx /headers/makemake $(PATTERN) >makefile
  41.  
  42. clean:
  43.     -rm */*.o */*.bo */*.err
  44.  
  45. veryclean: clean
  46.     -rm libm.a blibm.a makefile
  47.  
  48. libm.a: $(OBJECTS2) makefile
  49.     -rm libm.a
  50.     ar -q libm.a $(OBJECTS2)
  51.     ranlib libm.a
  52.  
  53. blibm.a: $(BOBJECTS2) makefile
  54.     -rm blibm.a
  55.     ar -q blibm.a $(BOBJECTS2)
  56.     ranlib blibm.a
  57.  
  58. stdio/vfprintf.o: ../nix/stdio/vfprintf.c
  59.     gcc $(OPTIONS) ../nix/stdio/vfprintf.c -c -o stdio/vfprintf.o
  60.  
  61. stdio/vfprintf.bo: ../nix/stdio/vfprintf.c
  62.     gcc $(BOPTIONS) ../nix/stdio/vfprintf.c -c -o stdio/vfprintf.bo
  63.  
  64. stdio/vfscanf.o: ../nix/stdio/vfscanf.c
  65.     gcc $(OPTIONS) ../nix/stdio/vfscanf.c -c -o stdio/vfscanf.o
  66.  
  67. stdio/vfscanf.bo: ../nix/stdio/vfscanf.c
  68.     gcc $(BOPTIONS) ../nix/stdio/vfscanf.c -c -o stdio/vfscanf.bo
  69.  
  70. .SUFFIXES:
  71. .SUFFIXES: .o .bo
  72.